package com.mc.service.impl;

import com.mc.bean.Jury;
import com.mc.dao.Impl.JuryDaoImpl;
import com.mc.dao.JuryDao;
import com.mc.service.JuryService;

import java.util.List;

/**
 * @Description 评委业务逻辑接口实现类
 * @author wangcf
 * @date 2023/2/13 16:33
 * @version 1.0
 */
public class JuryServiceImpl implements JuryService {
    JuryDao juryDao=new JuryDaoImpl();
    @Override
    public List<Jury> findAll() {
        return juryDao.findAll();
    }

    @Override
    public Jury findByJuryId(int juryid) {
        return juryDao.findByJuryId(juryid);
    }

    @Override
    public Jury login(String tel, String pass) {
        return juryDao.findByTelPass(tel,pass);
    }

    @Override
    public boolean add(Jury jury) {
        return juryDao.add(jury)>0?true:false;
    }

    @Override
    public boolean delete(int juryid) {
        return juryDao.delete(juryid)>0?true:false;
    }

    @Override
    public boolean update(Jury jury) {
        return juryDao.update(jury)>0?true:false;
    }

    @Override
    public Jury findByTel(String tel) {
        return juryDao.findByTel(tel);
    }
}
